Fix generating random MCP endpoint URL in templates#12558
Merged
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12558Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12558" |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds MCP (Model Context Protocol) endpoint configuration to Aspire project templates. MCP endpoints are configured similarly to existing OTLP endpoints with both HTTP and HTTPS variants.
- Adds port configuration parameters for MCP HTTP (18000) and HTTPS (23000) endpoints across all templates
- Updates template configuration files to support user-specified or auto-generated MCP ports
- Adds MCP endpoint environment variables to launch settings
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/Aspire.ProjectTemplates/templates/aspire-starter/.template.config/template.json |
Adds MCP HTTP/HTTPS port parameters with generation and coalescing logic |
src/Aspire.ProjectTemplates/templates/aspire-starter/.template.config/dotnetcli.host.json |
Hides MCP port parameters from CLI interface |
src/Aspire.ProjectTemplates/templates/aspire-py-starter/13.0/apphost.run.json |
Adds MCP endpoint environment variable configuration |
src/Aspire.ProjectTemplates/templates/aspire-py-starter/.template.config/template.json |
Adds MCP HTTP/HTTPS port parameters with generation and coalescing logic |
src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/template.json |
Adds MCP HTTP/HTTPS port parameters with generation and coalescing logic |
src/Aspire.ProjectTemplates/templates/aspire-empty/.template.config/dotnetcli.host.json |
Hides MCP port parameters from CLI interface |
src/Aspire.ProjectTemplates/templates/aspire-apphost/.template.config/template.json |
Adds MCP HTTP/HTTPS port parameters with generation and coalescing logic |
src/Aspire.ProjectTemplates/templates/aspire-apphost/.template.config/dotnetcli.host.json |
Hides MCP port parameters from CLI interface |
src/Aspire.ProjectTemplates/templates/aspire-apphost-singlefile/.template.config/template.json |
Adds MCP HTTP/HTTPS port parameters with generation and coalescing logic |
src/Aspire.ProjectTemplates/templates/aspire-apphost-singlefile/.template.config/dotnetcli.host.json |
Hides MCP port parameters from CLI interface |
davidfowl
approved these changes
Oct 31, 2025
Member
|
/backport to release/13.0 |
Contributor
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18986770305 |
Member
Author
|
I made this PR at the end of the day and didn't test it before signing off. Does it work? |
Member
|
I did, yes it does. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ASPIRE_DASHBOARD_MCP_ENDPOINT_URLvalues had previously been added to template'slaunchSettings.json. However config wasn't added to templates to generate a random value for the endpoint when a template was created.Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate